<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title></title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <style>
    nav {
      background-color: #f1f1f1;
    }
    
    ul {
      display: flex;
      justify-content: space-between;
      list-style: none;
      margin: 0;
      padding: 0;
    }
    
    li {
      margin: 0 10px;
    }
    
    a {
      color: #333;
      text-decoration: none;
    }
    
    .active {
      color: #fff;
      background-color: #333;
      border-radius: 5px;
      padding: 5px 10px;
    }
  </style>
</head>
<body>
  <div id="app">
    <nav>
      <ul>
        <li v-for="(item, index) in items" :key="index" :class="{ active: activeIndex === index }">
          <a href="#" @click.prevent="activeIndex = index">{{ item }}</a>
        </li>
      </ul>
    </nav>
  </div>
  <script>
    new Vue({
      el: '#app',
      data() {
        return {
          items: ['Home', 'About', 'Services', 'Contact'],
          activeIndex: 0
        };
      }
    })
  </script>
</body>
</html>